﻿<UserControl x:Class="AutoScrollViewer.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="400" Height="300">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="300"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <ScrollViewer Name="SV" Grid.Column="0" Height="auto" HorizontalScrollBarVisibility="Visible" Width="auto">
            <Canvas Width="1000" Height="1000" Background="White" Name="CvMain">
                <Ellipse Fill="AliceBlue" Width="1000" Height="1000"/>
            </Canvas>
        </ScrollViewer>
        <StackPanel Grid.Column="1">
            <Button Name="cmdAuto" Click="cmdAuto_Click" Width="100" Height="50" Content="Auto"/>
            <Button Name="cmdDrag" Click="cmdDrag_Click" Width="100" Height="50" Content="Drag"/>
            <Button Name="cmdOff" Click="cmdOff_Click" Width="100" Height="50" Content="Off"/>
            <Button Name="cmdAdd" Click="Button_Click" Width="100" Height="50" Content="New Rectangle"/>
            <TextBlock Name="txttest"/>
        </StackPanel>
    </Grid>
</UserControl>
